package com.songlanyun.modules.sharebenefitconfig.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.enums.CommonwealConstant;
import com.songlanyun.common.enums.GoodsConstant;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.sharebenefitconfig.entity.CommonwealShareBenefitConfigEntity;
import com.songlanyun.modules.sharebenefitconfig.model.IShareBenefitConfig;
import com.songlanyun.modules.sharebenefitconfig.model.InviteConfig;
import com.songlanyun.modules.sharebenefitconfig.model.PartnerConfig;
import com.songlanyun.modules.sharebenefitconfig.model.dto.CommonwealShareBenefitConfigDTO;

import java.util.List;
import java.util.Map;

/**
 * 公益分润配置
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-16 15:00:17
 */
public interface CommonwealShareBenefitConfigService extends IService<CommonwealShareBenefitConfigEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void add(CommonwealShareBenefitConfigDTO dto);

    IShareBenefitConfig getByType(CommonwealConstant.ShareBenefitConfigType type);

    CommonwealShareBenefitConfigEntity loadByType(CommonwealConstant.ShareBenefitConfigType type, boolean tw);

    /**
     * 根据资格获取公益联盟合伙人配置
     *
     * @param qualification
     * @return
     */
    PartnerConfig.CommonwealPartnerConfig getPartnerConfigByQualification(GoodsConstant.ServicePackageArea qualification);

    /**
     * 获取服务体系成员邀请会员成为创客，可以获取的服务积分
     *
     * @return
     */
    Integer getServicePointsRatio();

    /**
     * 创客直推的爱心小屋下的直推会员产生的订单金额的多少分给创客
     *
     * @return
     */
    Integer getOrderRatio();

    List<CommonwealShareBenefitConfigEntity> queryList();

}

